<!DOCTYPE html>
<html>
<head>
    <title>页面加载中...</title>
    <meta charset="utf-8"/>
<!--    <link rel="stylesheet" type="text/css" href="./css/index.css">-->
</head>
<body>
<!--<h1> 11 Welcome to WaiJiaoJun :)</h1>-->
<!--<h2>页面加载中...</h2>-->
</body>
</html>
<script src="js/vue.js"></script>
<script src="js/vue-resource.js"></script>
<script src="js/vue-router.js"></script>
<script src="js/basis.js"></script>
<script type="text/javascript">
    window.onload = function () {
        var vm = new Vue({
            el: '',
            data: {},
            methods: {
                isPayfun: function () {
                    this.$http.post(URL + '/tpo/payment/isPay', {}).then(function (res) {
                        if (res.data.status == 200) {
                            if (res.data.data.isPay == 0) {
                                window.location.href = 'buy.html'
                            }
                            ;
                            if (res.data.data.isPay == 1) {
                                window.location.href = 'home.html'
                            }
                        }
                        else if (res.data.status == 400) {
                            alert(res.data.message)
                        } else if (res.data.status == 500) {
                            alert(res.data.message)
                        }else{
                            window.location.href = 'index.html';
                        }
                    }, function (res) {
                        console.log("error");
                        console.log(res.status);
                        console.log(res);
                    })
                }
            }

        })
        vm.isPayfun();
    }
</script>